package cn.wolfcode.luowowo.web.controller;

import cn.wolfcode.luowowo.domain.${capitalize};
import cn.wolfcode.luowowo.query.${capitalize}Query;
import cn.wolfcode.luowowo.service.I${capitalize}Service;
import cn.wolfcode.luowowo.util.JsonResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("${uncapitalize}s")
public class ${capitalize}Controller {

    @Autowired
    private I${capitalize}Service ${uncapitalize}Service;

    @GetMapping("query")
    public Object query(${capitalize}Query qo){
        Page<${capitalize}> page = ${uncapitalize}Service.query(qo);
        return JsonResult.success(page);
    }

}
